#ifndef __PARSEXML_H__
#define __PARSEXML_H__
#include "xml.h"

#define XML_HEADER      "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"

//base
#define SIGNAL_STRENGTH             "/CFG/Base/Daily/SignalStrength"
#define BATTERY_INFO                "/CFG/Base/Daily/BatteryInfo"
#define DEFENCE_STATUS              "/CFG/Base/Daily/DefenceStatus"
#define BALANCE                     "/CFG/Base/Daily/Balance"

#define LOW_SIGNAL_ENABLE           "/CFG/Base/AlarmParam/LowSignalEnable"
#define LOW_SIGNAL_THRESHOLD        "/CFG/Base/AlarmParam/LowSignalThreshold"
#define DEFENCE_DELAY               "/CFG/Base/AlarmParam/DefenceDelay"
#define UNDEFENCE_DELAY             "/CFG/Base/AlarmParam/UndefenceDelay"
#define IS_USE_ALARM                "/CFG/Base/AlarmParam/IsUseAlarm"

#define BASE_EMAIL_SRVADDR          "/CFG/Base/EmailSetting/SMTPSrvAddr"
#define BASE_EMAIL_SRVPORT          "/CFG/Base/EmailSetting/SMTPSrvPort"
#define BASE_EMAIL_USER             "/CFG/Base/EmailSetting/EmailUser"
#define BASE_EMAIL_PASSWD           "/CFG/Base/EmailSetting/EmailPasswd"

//remote
#define REMOTE_DEVICE               "/CFG/URC/RemoteDevice"
#define REMOTE_DEVICE_INDEX         "/CFG/URC/RemoteDevice/Index"
#define REMOTE_DEVICE_DELETE        "/CFG/URC/RemoteDevice/Delete"
#define REMOTE_DEVICE_DEFENCE       "/CFG/URC/RemoteDevice/Defence"
#define REMOTE_DEVICE_UNDEFENCE     "/CFG/URC/RemoteDevice/UnDefence"
#define REMOTE_DEVICE_EMERGENCY     "/CFG/URC/RemoteDevice/Emergency"
#define REMOTE_DEVICE_ATHOME        "/CFG/URC/RemoteDevice/AtHome"

//sensor device
#define SENSOR_DEVICE               "/CFG/SensorDevicesSettings/Sensor"
#define SENSOR_DEVICE_INDEX         "/CFG/SensorDevicesSettings/Sensor/Index"
#define SENSOR_DEVICE_DELETE        "/CFG/SensorDevicesSettings/Sensor/Delete"
#define SENSOR_DEVICE_ID            "/CFG/SensorDevicesSettings/Sensor/ID"
#define SENSOR_DEVICE_NAME          "/CFG/SensorDevicesSettings/Sensor/SensorName"
#define SENSOR_DEVICE_ENABLE        "/CFG/SensorDevicesSettings/Sensor/Enable"
#define SENSOR_DEVICE_TYPE          "/CFG/SensorDevicesSettings/Sensor/SecurityType"
#define SENSOR_DEVICE_CAMERA        "/CFG/SensorDevicesSettings/Sensor/Camera"
#define SENSOR_DEVICE_SNAPSHOT      "/CFG/SensorDevicesSettings/Sensor/VideoCapture"
#define SENSOR_DEVICE_RECORD        "/CFG/SensorDevicesSettings/Sensor/VideoRecording"
#define SENSOR_DEVICE_SMS           "/CFG/SensorDevicesSettings/Sensor/SendSMS"
#define SENSOR_DEVICE_MMS           "/CFG/SensorDevicesSettings/Sensor/SendMMS"
#define SENSOR_DEVICE_EMAIL         "/CFG/SensorDevicesSettings/Sensor/SendEmail"
#define SENSOR_DEVICE_ALARM         "/CFG/SensorDevicesSettings/Sensor/Alarm"
#define SENSOR_DEVICE_DESCRIPTION   "/CFG/SensorDevicesSettings/Sensor/Description"

//action device
#define ACTION_DEVICE               "/CFG/ActionDevicesSettings/Action"
#define ACTION_DEVICE_INDEX         "/CFG/ActionDevicesSettings/Action/Index"
#define ACTION_DEVICE_DELETE        "/CFG/ActionDevicesSettings/Action/Delete"
#define ACTION_DEVICE_ID            "/CFG/ActionDevicesSettings/Action/ID"
#define ACTION_DEVICE_NAME          "/CFG/ActionDevicesSettings/Action/ActionName"
#define ACTION_DEVICE_DESCRIPTION   "/CFG/ActionDevicesSettings/Action/Description"
#define ACTION_DEVICE_ENABLE        "/CFG/ActionDevicesSettings/Action/Enable"

//GSM

#define GSM_RESP_SMS_TIME_SYNC      "/CFG/ResponseSetting/GSM/SMSSetting/TimeSyncNumber"
#define GSM_RESP_SMS_SMSC           "/CFG/ResponseSetting/GSM/SMSSetting/SMSCNumber"


#define GSM_RESP_MMS_URL            "/CFG/ResponseSetting/GSM/MMSSetting/MMSUrl"
#define GSM_RESP_MMS_GW             "/CFG/ResponseSetting/GSM/MMSSetting/GateWay"
#define GSM_RESP_MMS_APN            "/CFG/ResponseSetting/GSM/MMSSetting/APN"
#define GSM_RESP_MMS_PORT           "/CFG/ResponseSetting/GSM/MMSSetting/Port"


//CS
#define CONTACT_NUM                 "/CFG/ContactsSettings/Contact"
#define CONTACT_INDEX               "/CFG/ContactsSettings/Contact/Index"
#define CONTACT_DELETE              "/CFG/ContactsSettings/Contact/Delete"
#define CONTACT_NAME                "/CFG/ContactsSettings/Contact/ContactName"
#define CONTACT_PHONE               "/CFG/ContactsSettings/Contact/PhoneNumber"
#define CONTACT_EMAIL               "/CFG/ContactsSettings/Contact/Email"
#define CONTACT_EN_SMS              "/CFG/ContactsSettings/Contact/SendSMS"
#define CONTACT_EN_MMS              "/CFG/ContactsSettings/Contact/SendMMS"
#define CONTACT_EN_EMAIL            "/CFG/ContactsSettings/Contact/SendEmail"

int xml_getstr(struct xml_element* e, const char* xpath, char *pstr, int index);
int xml_getint(struct xml_element* e, const char* xpath, int *num, int index );
int xml_getnodenum(struct xml_element* e, const char* xpath );

#endif
